<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	template="/templates/template-mestre-detalhe.xhtml">

	<ui:define name="title">
		<p:outputLabel value="Venda do Caixa" styleClass="header-page" />
	</ui:define>

	<ui:define name="mestre">

		<p:panelGrid id="panel_dialog_mestre">

			<p:row>
				<p:column>
					<p:outputLabel value="Data da Venda" for="itemvenda_data_venda" />
				</p:column>
				<p:column>
					<p:outputLabel id="itemvenda_data_venda" value="#{vendaMestreDetalheMB.mestreModel.dataAbertura}">
						<f:convertDateTime pattern="dd/MM/yyyy" />
					</p:outputLabel>
				</p:column>
			</p:row>

		</p:panelGrid>

	</ui:define>

	<ui:define name="tabela">

		<p:dataTable id="dataTable" value="#{vendaMestreDetalheMB.listModel}" var="item" rows="10" paginator="true"
			paginatorPosition="bottom" emptyMessage="#{label['sistema.tabela.emptymessage']}" lazy="true">

			<p:column headerText="Início" width="80">
				<p:outputLabel value="#{item.dtInicio}">
					<f:convertDateTime pattern="HH:mm" />
				</p:outputLabel>
			</p:column>

			<p:column headerText="Atendente">
				<p:outputLabel value="#{item.atendente.nome}" />
			</p:column>

			<p:column headerText="Total da Venda" width="80">
				<p:outputLabel value="#{item.vlTotalVenda}">
					<f:convertNumber type="currency" />
				</p:outputLabel>
			</p:column>

			<p:column headerText="Pagamento" width="80">
				<p:outputLabel value="#{item.vlPagamento}">
					<f:convertNumber type="currency" />
				</p:outputLabel>
			</p:column>

			<p:column headerText="Troco" width="80">
				<p:outputLabel value="#{item.vlTroco}">
					<f:convertNumber type="currency" />
				</p:outputLabel>
			</p:column>

		</p:dataTable>

	</ui:define>

	<ui:define name="comandos">
		<p:commandButton value="#{label['sistema.botao.voltar']}" title="#{label['sistema.botao.voltar']}"
			action="caixa-manutencao" immediate="true" />
	</ui:define>

</ui:composition>